package com.kxf.androidtestdemo.activity

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.kxf.androidtestdemo.R
import java.util.*

class KotlinTestActivity : AppCompatActivity() {

    var ac = null;

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_kotlin_test)

        System.out.println("numAdd  " + numAdd(3, 4))

        try {
            printObject(ac!!)
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

    fun numAdd(a:Int, b:Int): Int{
        return a + b
    }

    fun printObject(obj: AppCompatActivity){
        System.out.println("printObject  " + obj.toString())
    }
}
